package com.five.service.impl;

import com.five.dao.TransactionRecordsMapper;
import com.five.entity.TransactionRecords;
import com.five.service.TransactionRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/2/23.
 */
@Service("TransactionRecordService")
public class TransactionRecordServiceImpl implements TransactionRecordService {

    @Autowired
    private TransactionRecordsMapper recordsMapper;

    @Override
    public void addTransactionRecord(TransactionRecords transactionRecords) {
        recordsMapper.insertSelective(transactionRecords);
    }

    @Override
    public List<TransactionRecords> getRecords(Integer userId) {
        return recordsMapper.selectByUserId(userId);
    }


}
